<!DOCTYPE html>
<html>
  <head>
    <title><%= content_for?(:title) ? yield(:title) : "Survey Says" %></title>
    <%= stylesheet_link_tag "survey_says" %>
    <%= javascript_include_tag "survey_says" %>
    <%= csrf_meta_tag %>
    <%= yield(:head) %>
  </head>
  <body>
    <div id="container">
      <div id="main-container">
        <% flash.each do |name, msg| %>
          <%= content_tag :div, msg, :id => "flash_#{name}" %>
        <% end %>
        <%#= content_tag :h1, yield(:title) if show_title? %>
        <%= yield %>
      </div>
      <div id="right-container">
        <ul style='padding:10px;'>
          <li style='margin-bottom:10px;'><%= link_to "Questionnaires", survey_admin_questionnaires_path() %></li>
          <li style='margin-bottom:10px;'><%= link_to "Questions", survey_admin_questions_path() %></li>
          <% if @question.try(:id) %>
            <li style='margin-bottom:10px;'>
              <%= link_to "Answers", survey_admin_question_answers_path(@question) %>
            </li>
          <% elsif @answer.try(:id) %>
            <li style='margin-bottom:10px;'>
              <%= link_to "Answers", survey_admin_question_answers_path(@answer.question) %>
            </li>
          <% end %>

            <%= link_to 'Properties', survey_admin_survey_properties_url %>
        </ul>
      </div>
      <div class='clearfix'></div>
    </div>
  </body>
</html>
